<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">



    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/dist/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/plugins/datapicker/datepicker3.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>基本信息</h5>
                </div>
                <div class="ibox-content">
                    <table class="table table-bordered text-center">
                        <tbody>
                        <tr>
                            <td>订单号</td>
                            <td>下单时间</td>
                            <td>配送费用</td>
                            <td>物流方式</td>
                            <td>物流单号</td>
                        </tr>
                        <tr>
                            <td>{$order_info.order_sn}</td>
                            <td>{$order_info['add_time']|date="Y-m-d H:i",###}</td>
                            <td>￥{$order_info['shipping_price']}</td>
                            <td>
                                <select id="shipping_code" class="form-control">
                                    {foreach name="shippingList" item="item"}
                                        <option value="{$item.code}" {if condition="$order_info['shipping_code'] eq $item['code']"}selected{/if}>{$item.name}</option>
                                    {/foreach}
                                </select>
                            </td>
                            <td>
                                <input type="text" class="form-control" id="shipping_number" value="{$order_info.shipping_number}" style="text-align: center;">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>收货信息</h5>
                </div>
                <div class="ibox-content">
                    <table class="table table-bordered text-center">
                        <tbody>
                        <tr width="16.66%">
                            <td>收货人</td>
                            <td>联系方式</td>
                            <td>地址</td>
                            <td>邮编</td>
                        </tr>
                        <tr>
                            <td>{$order_info.consignee}</td>
                            <td>{$order_info.mobile}</td>
                            <td>{$order_info.region_address},{$order_info.address}</td>
                            <td>{$order_info.zipcode}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>服务信息</h5>
                </div>
                <div class="ibox-content">
                    <table class="table table-bordered text-center">
                        <tbody>
                        <tr>
                            <td>服务</td>
                            <td>属性</td>
                            <td>数量</td>
                            <td>单品价格</td>
                            <td>单品小计</td>
                        </tr>
                        {foreach name="order_info['goodsList']" item="goods"}
                            <tr>
                                <td>{$goods.goods_name}</td>
                                <td>{$goods.attr_key_name}</td>
                                <td>{$goods.goods_num}</td>
                                <td>￥{$goods.price}</td>
                                <td>￥{$goods['price']*$goods['goods_num']}</td>
                            </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <a href="{:Url('Order/orderPrint',['order_id'=>$order_info['order_id']])}" target="_blank" class="btn btn-success margin" ><i class="fa fa-print"></i> 打印配货单</a>
                </div>
            </div>
        </div>
    </div>
    {if condition="$order_info['shipping_status'] eq 0"}
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>操作信息</h5>
                </div>
                <div class="ibox-content">
                    <form method="post" action="{:Url('Order/orderAction')}">
                        <input type="hidden" name="order_id" value="{$order_info['order_id']}">
                        <table class="table table-bordered text-center">
                            <tbody>
                            <tr>
                                <td>操作备注</td>
                                <td><textarea name="note" id="note" class="form-control"></textarea></td>
                            </tr>
                            <tr>
                                <td width="20%">当前可执行操作</td>
                                <td class="text-left">
                                    <button class="btn btn-primary margin" type="button" onclick="doDelivery();">确认发货</button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
    {/if}
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>操作记录</h5>
                </div>
                <div class="ibox-content">
                    <table class="table table-bordered text-center">
                        <tbody>
                        <tr>
                            <td>操作人</td>
                            <td>操作时间</td>
                            <td>订单状态</td>
                            <td>付款状态</td>
                            <td>发货状态</td>
                            <td>描述</td>
                            <td>备注</td>
                        </tr>
                        {foreach name="order_info[action]" item="item"}
                            <tr>
                                <td>{$item['nickname'] ? $item['nickname'] : 后台管理员}</td>
                                <td>{$item['log_time']|date="Y-m-d H:i",###}</td>
                                <td>{$order_status[$item[order_status]]}</td>
                                <td>{$pay_status[$item[pay_status]]}</td>
                                <td>{$shipping_status[$item[shipping_status]]}</td>
                                <td>{$item.status_desc}</td>
                                <td>{$item.action_note}</td>
                            </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row" id="kuaidiBox">

    </div>
</div>
<script src="__PUBLIC__/dist/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/dist/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/dist/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__PUBLIC__/dist/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/dist/js/plugins/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/dist/js/demo/peity-demo.min.js"></script>
<script src="__PUBLIC__/dist/js/plugins/layer/layer.min.js"></script>
<script src="__PUBLIC__/dist/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    function doDelivery(){
        var order_id = "{$order_info['order_id']}";
        var shipping_code = $('#shipping_code').val();
        var shipping_number = $('#shipping_number').val();
        var note = $('#note').val();
        if(!shipping_code || !shipping_number){
            layer.msg('请填写物流单号');
            return;
        }
        $.ajax({
            url:"{:Url('Order/deliveryHandle')}",
            type:'post',
            data:{order_id:order_id,shipping_code:shipping_code,shipping_number:shipping_number,note:note},
            success:function(){
                window.location.href = "{:Url('Order/deliveryList')}";
            }
        });
    }
    if('{$order_info["shipping_code"]}' != '' && '{$order_info["shipping_number"]}' != ''){
        $.ajax({
            url:"{:U('Order/getKuaidiBox')}",
            data:{shipping_code:'{$order_info["shipping_code"]}',shipping_number:'{$order_info["shipping_number"]}'},
            type:"get",
            dataType:"html",
            success:function(html){
                $('#kuaidiBox').html(html);
            }
        })
    }
</script>

</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->
</html>
